Optimal. Leaf size=54 \[ -\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{f (a+b)^{3/2}}-\frac {\cot (e+f x)}{f (a+b)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4132, 325, 205} \[ -\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{f (a+b)^{3/2}}-\frac {\cot (e+f x)}{f (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 325
Rule 4132
Rubi steps
\begin {align*} \int \frac {\csc ^2(e+f x)}{a+b \sec ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{x^2 \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {\cot (e+f x)}{(a+b) f}-\frac {b \operatorname {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{(a+b) f}\\ &=-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{(a+b)^{3/2} f}-\frac {\cot (e+f x)}{(a+b) f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.64, size = 189, normalized size = 3.50 \[ \frac {\sec ^2(e+f x) (a \cos (2 (e+f x))+a+2 b) \left (\sqrt {a+b} \csc (e) \sin (f x) \sqrt {b (\cos (e)-i \sin (e))^4} \csc (e+f x)+b (\cos (2 e)-i \sin (2 e)) \tan ^{-1}\left (\frac {(\cos (2 e)-i \sin (2 e)) \sec (f x) (a \sin (2 e+f x)-(a+2 b) \sin (f x))}{2 \sqrt {a+b} \sqrt {b (\cos (e)-i \sin (e))^4}}\right )\right )}{2 f (a+b)^{3/2} \sqrt {b (\cos (e)-i \sin (e))^4} \left (a+b \sec ^2(e+f x)\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 271, normalized size = 5.02 \[ \left [\frac {\sqrt {-\frac {b}{a + b}} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (a b + b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {b}{a + b}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) \sin \left (f x + e\right ) - 4 \, \cos \left (f x + e\right )}{4 \, {\left (a + b\right )} f \sin \left (f x + e\right )}, \frac {\sqrt {\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {b}{a + b}}}{2 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right )}{2 \, {\left (a + b\right )} f \sin \left (f x + e\right )}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.75, size = 74, normalized size = 1.37 \[ -\frac {\frac {{\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\relax (b) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )} b}{\sqrt {a b + b^{2}} {\left (a + b\right )}} + \frac {1}{{\left (a + b\right )} \tan \left (f x + e\right )}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.83, size = 54, normalized size = 1.00 \[ -\frac {b \arctan \left (\frac {\tan \left (f x +e \right ) b}{\sqrt {\left (a +b \right ) b}}\right )}{f \left (a +b \right ) \sqrt {\left (a +b \right ) b}}-\frac {1}{f \left (a +b \right ) \tan \left (f x +e \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 50, normalized size = 0.93 \[ -\frac {\frac {b \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} {\left (a + b\right )}} + \frac {1}{{\left (a + b\right )} \tan \left (f x + e\right )}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.28, size = 46, normalized size = 0.85 \[ -\frac {\mathrm {cot}\left (e+f\,x\right )}{f\,\left (a+b\right )}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (e+f\,x\right )}{\sqrt {a+b}}\right )}{f\,{\left (a+b\right )}^{3/2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc ^{2}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________